-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(e2e): add e2e tests for the evidence module #1779
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1779 +/- ##
=======================================
Coverage 43.13% 43.13%
=======================================
Files 15 15
Lines 1340 1340
=======================================
Hits 578 578
Misses 742 742
Partials 20 20 |
@@ -0,0 +1,29 @@ | |||
package e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A more complicated scenario would be to have blocks with the following:
- DuplicateVoteEvidence
- LightClientAttackEvidence
... and check for those as well. Future todo?
tests/e2e/e2e_exec_test.go
Outdated
hash, | ||
} | ||
|
||
s.executeGaiaTxCommand(ctx, c, gaiaCommand, valIdx, func(stdOut []byte, stdErr []byte) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we might want to rename or rework executeGaiaTxCommand
for cli commands that don't require validation of the tx hash...keys
and query
subcommands would fall under this category.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree! I also moved the other API queries to the querie.go
file in this PR #1780. The evidence API seems not to be working well. I opened an issue in the cosmos-sdk repo (cosmos/cosmos-sdk#13444). We can only query by CLI now, my idea was to try to put all CLI exec commands in the same file, but we can move to e2e_query_test.go
. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah sounds great 👍
# Conflicts: # tests/e2e/e2e_exec_test.go # tests/e2e/query.go
# Conflicts: # tests/e2e/chain.go # tests/e2e/e2e_setup_test.go # tests/e2e/query.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Feel free to merge @Pantani : )
close #1676
Description
Since the evidence module doesn't have gaiad tx, this PR only adds evidence into the genesis JSON and queries all evidence.